Maven仓库—Mac OX环境搭建Nexus

下载nexus安装包

官方地址,需要翻墙。

Nexus Repository Manager OSS【OSS = Open Source Software,开源软件——免费】
Nexus Repository Manager – Free Trial【专业版本,免费试用——收费】

在此选择NEXUS OSS,

下载 OSX 版本,解压目录结构如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
.
└── nexus-3.2.1-01-mac
├── nexus-3.2.1-01 #配置文件
│   ├── LICENSE.txt
│   ├── NOTICE.txt
│   ├── bin
│   ├── deploy
│   ├── etc
│   ├── lib
│   ├── public
│   └── system
└── sonatype-work #默认存储文件
└── nexus3

Homebrew安装nexus

使用Homebrew安装,(关于请参考软件包管理工具Homebrew),执行brew install nexus,安装即可。
查看nexus的状态并启动:

1
2
3
4
5
6
$ brew services list
Name Status User Plist
nexus stopped
$ brew services start nexus
==> Successfully started `nexus` (label: homebrew.mxcl.nexus)

或者直接执行nexus命令:

1
2
$ nexus
Usage: /usr/local/bin/nexus { console | start | stop | restart | status | dump }

访问地址:http://localhost:8081/nexus/

问题:在安装完nexus的之后,在启动nexus的时候发现无法启动nexus提示如下错误:
wrapper | The nexus service was launched, but failed to start
8081端口号被占用。
vi /usr/local/Cellar/nexus/2.14.3-02/libexec/conf/nexus.properties,进行编辑

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Sonatype Nexus
# ==============
# This is the most basic configuration of Nexus.
# Jetty section
application-port=8081
application-host=0.0.0.0
nexus-webapp=${bundleBasedir}/nexus
nexus-webapp-context-path=/nexus
# Nexus section
nexus-work=/usr/local/var/nexus
runtime=${bundleBasedir}/nexus/WEB-INF
# orientdb buffer size in megabytes
storage.diskCache.bufferSize=4096

修改application-port,重启即可。

http://blog.csdn.net/wang379275614/article/details/43940259